The present invention relates generally to the field of data processing systems, and more particularly to applying program patch sets to computer programs.
Computer users have long had a need for continuous, non-disrupted operation. Methods have been developed to modify and update computer programs concurrently with their execution, where new code, or a patch, is loaded into the computer.
Typically, a computer program consists of various sections, such as, executable machine code, static data variables, and temporary data. The executable code may be comprise of various procedures that are called via their address in memory. A static data variable is kept valid in the same memory address during the entire execution of the program. In contrast, a temporary data variable (and its location in memory) is only valid during certain periods of the program execution, for example, during the execution of a specific procedure.
Typically concurrently loading a plurality of new modules while code of a plurality of modules of an original (i.e., currently running) computer program can be loaded and executed on a computer system. A commonly employed method is to use a memory layout of the Operating System. Such a memory layout can be created during system initialization. Typically, preparing such a memory layout comprises allocating a module thread local storage (TLS) block for each thread within an initial computer program, wherein the allocated module TLS blocks are large enough to hold all module thread variables that are loaded or to be loaded. Further preparing such a memory layout further comprises providing constant offsets between module TLS block pointers corresponding to the module TLS blocks and the module thread variables for all of the threads. Modules can be added to the original computer program or a concurrent patch can be applied by replacing one or more of the plurality of original computer program modules.